import React, { Component } from 'react'
import { HashRouter as Router, Route, Switch } from 'react-router-dom'
// import Home from '../router1/Home'
import Info from './info'
import About from '../router1/About'
import Topics from '../router1/Topics'
import Content from './content'
import Wrap from './Home'
import NoFound from './NoFound'

class Router4 extends Component {

    render() {
        return (
            <Router>
                <Wrap>
                    <Switch>
                        <Route path="/admin" render={() =>
                            <Content>
                                <Route path="/admin/:id" component={Info}></Route>
                            </Content>
                        }></Route>
                        <Route path="/about" component={About}></Route>
                        <Route path="/topics" component={Topics}></Route>
                        <Route component={NoFound}></Route>
                    </Switch>
                </Wrap>
            </Router>
        )
    }
}

export default Router4